import Vue from 'vue'
import Vuex from 'vuex'

// 一个自动将状态机里的数据存放到localStory的插件
import createPersistedState from 'vuex-persistedstate'

import mutations from './mutations'
import actions from './actions'

Vue.use(Vuex)

let state = {
  reviewList:[],
  collectList:[],
  userList:[]
}

export default new Vuex.Store({
  plugins:[createPersistedState()],
  state,
  mutations,
  actions
})
// const store = new Vuex.Store({
//   state,
//   mutations,
//   actions
// })

// // 挂载到vue实例
// export default store